import {
	myRequest
} from '@/utils/request.js'
/**
 * 分页列表
 */
export const getPage = (obj) => {
	return myRequest({
		url: '/mallapi/shoppingcart/page',
		method: 'get',
		data: obj,
		showLoading: true
	});
}
/**
 * 购物车添加
 */
export const shoppingCartAdd = (obj) => {
	return myRequest({
		url: '/mallapi/shoppingcart',
		method: 'post',
		data:obj,
		showLoading: true
	});
};
/**
 * 购物车编辑
 */
export const shoppingCartEdit = (obj) => {
	return myRequest({
		url: '/mallapi/shoppingcart',
		method: 'put',
		data:obj,
		showLoading: true
	});
};

/**
 * 购物车删除
 */
export const shoppingCartDel = (obj) => {
	return myRequest({
		url: '/mallapi/shoppingcart/del',
		method: 'post',
		data:obj,
		showLoading: true
	});
};


export const getCount = () => {
	return myRequest({
		url: '/mallapi/shoppingcart/count',
		method: 'get',
		showLoading: false
	});
}
